package com.ruoyi.supermarket.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品对象 tb_product
 * 
 * @author ruoyi
 * @date 2024-05-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Product
{
    private static final long serialVersionUID = 1L;

    /** 商品id */
    private Long productId;

    /** 商品码 */
    @Excel(name = "商品码")
    private String productCode;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 商品品牌 */
    @Excel(name = "商品品牌")
    private String productBrand;

    /** 建议采购价 */
    @Excel(name = "建议采购价")
    private BigDecimal cjPrice;

    /** 建议销售价 */
    @Excel(name = "建议销售价")
    private BigDecimal xsPrice;

    /** 规格 */
    @Excel(name = "规格")
    private String unit;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date manufactureDate;

    /** 过期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 产地 */
    @Excel(name = "产地")
    private String countryOfOrigin;

    /** 分类id */
    @Excel(name = "分类id")
    private Long categoryId;

    /** 供客id */
    @Excel(name = "供客id")
    private Long supplyId;

    /** 库存id */
    @Excel(name = "库存id")
    private Long stockId;

    /** 审核状态 1过 2待审核 3不通过 */
    @Excel(name = "审核状态 1过 2待审核 3不通过")
    private String isSh;

    /** 是否停用 */
    @Excel(name = "是否停用")
    private String status;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createName;

    /** 修改人 */
    @Excel(name = "修改人")
    private String updateName;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String shRemark;

    private String remark;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    //------------------新增额外字段
    private String categoryName;
    private String supplyName;
    private List<String> isShList;
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setProductCode(String productCode) 
    {
        this.productCode = productCode;
    }

    public String getProductCode() 
    {
        return productCode;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setProductBrand(String productBrand) 
    {
        this.productBrand = productBrand;
    }

    public String getProductBrand() 
    {
        return productBrand;
    }
    public void setCjPrice(BigDecimal cjPrice) 
    {
        this.cjPrice = cjPrice;
    }

    public BigDecimal getCjPrice() 
    {
        return cjPrice;
    }
    public void setXsPrice(BigDecimal xsPrice) 
    {
        this.xsPrice = xsPrice;
    }

    public BigDecimal getXsPrice() 
    {
        return xsPrice;
    }
    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }
    public void setManufactureDate(Date manufactureDate) 
    {
        this.manufactureDate = manufactureDate;
    }

    public Date getManufactureDate() 
    {
        return manufactureDate;
    }
    public void setExpirationDate(Date expirationDate) 
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate() 
    {
        return expirationDate;
    }
    public void setCountryOfOrigin(String countryOfOrigin) 
    {
        this.countryOfOrigin = countryOfOrigin;
    }

    public String getCountryOfOrigin() 
    {
        return countryOfOrigin;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setSupplyId(Long supplyId) 
    {
        this.supplyId = supplyId;
    }

    public Long getSupplyId() 
    {
        return supplyId;
    }
    public void setStockId(Long stockId) 
    {
        this.stockId = stockId;
    }

    public Long getStockId() 
    {
        return stockId;
    }
    public void setIsSh(String isSh) 
    {
        this.isSh = isSh;
    }

    public String getIsSh() 
    {
        return isSh;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }
    public void setUpdateName(String updateName) 
    {
        this.updateName = updateName;
    }

    public String getUpdateName() 
    {
        return updateName;
    }
    public void setShRemark(String shRemark) 
    {
        this.shRemark = shRemark;
    }

    public String getShRemark() 
    {
        return shRemark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productId", getProductId())
            .append("productCode", getProductCode())
            .append("productName", getProductName())
            .append("productBrand", getProductBrand())
            .append("cjPrice", getCjPrice())
            .append("xsPrice", getXsPrice())
            .append("unit", getUnit())
            .append("manufactureDate", getManufactureDate())
            .append("expirationDate", getExpirationDate())
            .append("countryOfOrigin", getCountryOfOrigin())
            .append("categoryId", getCategoryId())
            .append("supplyId", getSupplyId())
            .append("stockId", getStockId())
            .append("isSh", getIsSh())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createName", getCreateName())
            .append("updateName", getUpdateName())
            .append("shRemark", getShRemark())
            .toString();
    }
}
